package com.cloudeasy.provider.web.rpc;

import com.cloudeasy.core.support.BaseController;
import com.cloudeasy.provider.model.service.UaclUserTokenFeignApi;
import com.cloudeasy.provider.service.UacUserTokenService;
import com.cloudeasy.wrapper.Wrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户token.
 * Create By 郭金宝 on 2019/2/13.<br>
 */
@RestController
@Api(value = "API - UaclUserTokenFeignClient", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class UaclUserTokenFeignClient extends BaseController implements UaclUserTokenFeignApi {
    @Resource
    private UacUserTokenService uacUserTokenService;

    @Override
    @ApiOperation(httpMethod = "POST", value = "更新token离线状态")
    public Wrapper<Integer> updateTokenOffLine() {
        int result = uacUserTokenService.batchUpdateTokenOffLine();
        return handleResult(result);
    }
}